﻿


/****************************************
作者:QZJ
作用:打开模态选择窗口，选择操作中心
树形选择
09.26
****************************************/
function OpenSelectWindow(name, value, disabled) {
    var httpAim = "/View/CostCenter/SelectAndReturnDutyDept.aspx?ControlDisplay=";
    httpAim += encodeURI(name);
    httpAim += "&ControlValue=";
    httpAim += encodeURI(value);
    httpAim += "&ShowDisabled=";
    httpAim += encodeURI(disabled);
    //window.open(httpAim);
    window.showModalDialog(httpAim, window, '');
}


/****************************************
作者:QZJ
作用:打开模态选择窗口，选择产品
树形选择
11.4
****************************************/
function OpenSelectProductWindow(name, value) {
    var httpAim = "/View/ProductInProcess/QueryProduct.aspx?ControlDisplay="; //Query/Product.aspx?ControlDisplay=";
    httpAim += encodeURI(name);
    httpAim += "&ControlValue=";
    httpAim += encodeURI(value);
    window.showModalDialog(httpAim, window, '');
}


/****************************************
作者:QZJ
作用:返回产品选择
树形选择
11.4
****************************************/
function ReturnSelectedValue(idControlName, idControlValue, valueControlName, valueControlValue) {
    var parent = window.dialogArguments;
    if (parent == null) {
        alert("请从正确的操作方式打开窗口或者不支持当前浏览器.");
        window.close();
    }
    if (parent.document.getElementById(idControlName) == null) {
        alert('对不起。传递参数错误。请使用标准的浏览器');
        return;
    }
    parent.document.getElementById(idControlName).value = idControlValue;
    parent.document.getElementById(valueControlName).value = valueControlValue;
    window.close();
}